home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_100 / 178_01 / tvx_defs.ic < prev    next >
Text File  |  1986-01-16  |  12KB  |  286 lines

  1. /* ----------------------------->>> tvx_defs.ic <<<---------------------
  2.   TVX - A full screen editor written in C
  3.  
  4.   Revison summary:
  5.       Version
  6.     7/15/85 - Official Public Release Version
  7.     7/18/85 -  added -b (-b to -l, -b new) switch for Unix compatibility
  8.     8/22/85 -  fixed bug with setdscrl
  9.     9/20/85 -  major revision:   some minor bug fixes
  10.            added editrpt, storerpt, execrpt, spare1, spare2
  11.            major changes to file handling
  12.     9/30/85 -  of course, bugs...
  13.     10/6/85 -  I like this date.
  14.     10/18/85 - bug in autoindent with insert message
  15.     10/25/85 - 0<tab>, ^A wild to ^C because of insert problem
  16.     11/7/85 -  Atari version
  17.     11/12/85 - get find pattern added, some LASL stuff added, lex_def added
  18.            ^C back to ^A
  19.     11/15/85 - added write save buffer
  20.     11/25/85 - minor bug with auto insert ### ins mode ### + reset in main
  21.     11/26/85 - added BUFFINDEX type for atari
  22.     11/27/85 - bug in lex_default with loops
  23.     1/10/86     - small bug in memory with long file names
  24.     
  25.  
  26. *********************************************************************  */
  27.  
  28. #include <stdio.h>
  29.  
  30. #define MSDOS            /* 8086 MS-DOS */
  31.  
  32. #define NEED_MISC_DEFS /**/
  33. /* ======================================================================== */
  34. #ifdef NEED_MISC_DEFS
  35. /* following definitons are usually not defined in most stdio.h's */
  36.  
  37. #define NIL (-1)        /* nil ptr for lists */
  38. #define TRUE 1
  39. #define FALSE 0
  40. #define FAST static
  41. #define SLOW static
  42.  
  43. /* following might not be defined in some C's stdio.h, but usually are */
  44.  
  45. /* #define EOF (-1) */    /* standard end of file */
  46. /* #define EOS '\0' */    /* standard end of string */
  47. #endif
  48. /* ======================================================================== */
  49.  
  50. #define VERSION " - TVX (1/10/86) - " 
  51.  
  52. /* ======================================================================== */
  53. /* ====> Select terminal version: #define at most ONE of <================= */
  54. /*       the following symbols debending the terminal used. (except SUN)    */
  55.  
  56. #define IBMPC
  57. /* #define ATARI520 */
  58. /* #define VT100 */
  59. /* #define HP2621 */
  60. /*#define TERMCAP*/             /* Unix TERMCAP version */
  61. /* #define SUN */        /* define for SUN in addition to TERMCAP */
  62.  
  63. /* ======================================================================== */
  64. /* ==================> Select ONE operating system  <====================== */
  65.  
  66. #undef OSCPM         /* CP/M-80 */
  67. #undef GEMDOS            /* atari 520 gemdos */
  68.  
  69. /*#define UNIX  */        /* unix is a bit different! */
  70.  
  71. /* ======================================================================== */
  72. /* ========> select other options by defining appropriate symbols <======== */
  73.  
  74. #define VB /**/        /* whether or not to create backup log version */
  75.  
  76. #undef ULBD        /* supports underline, bold in ^U, ^B format */
  77.  
  78. #define STATREPEAT    /* define for Rpt: on status line (undef STATCURLINE) */
  79.  
  80. #undef STATCURLINE    /* define for Cur line on stat line (undef STATREPEAT) */
  81.  
  82.  
  83. /* ********************************************************************** */
  84. /* ********************************************************************** */
  85.  
  86. /*  Other options now selected automatically depending on above #defines  */
  87.  
  88. /* ********************************************************************** */
  89. /* ********************************************************************** */
  90.  
  91. /* ---------------- Operating System dependent defintions --------------- */
  92.  
  93. /* important note: max value for REPEATBUFS is 9!               */
  94.  
  95. /* ---------------------------------------------------------------------- */
  96. #ifdef OSCPM            /* uses Software Toolworks C/80 */
  97. #define BACKUPNAME "BACKUP.LOG"    /* backup log file name */
  98. #define BUFFLIMIT 2500        /* how much empty space to save in buffer */
  99. #define FILEREAD "rb"        /* read a file in binary */
  100. #define FILEWRITE "wb"        /* write a binary file */
  101. #define FNAMESIZE 14        /* size of file names */
  102. #define INT16 /**/        /* ints are 16 bits */
  103. #define LINELIMIT 75        /* number of spare lines to save */
  104. #define MAKE_BACKUP 1        /* 1 (true), want to make .bak file by default */
  105. #define MAXBUFF 40000        /* maximum number of total characters */
  106. #define MAXLINE 1150        /* maximum number of lines (abt. MAXBUFF/30) */
  107. #define REPEATBUFS 3        /* number of repeat buffers allowed */
  108. #define USELF /**/        /* using line feed on video */
  109. #define FILELF /**/            /* also in files */
  110. #define NEWLINE 13        /* 1st line separator: CR */
  111. #define USECTRLZ /**/
  112. #define NEEDTVLIB /**/        /* need standard c lib routines */
  113. #define BUFFINDEX unsigned int
  114. #endif
  115.  
  116. /* ---------------------------------------------------------------------- */
  117. #ifdef MSDOS
  118. #define HELP /**/        /* help available */
  119. #define FULLHELP /**/        /* all of it */
  120. #define CONFIGFILE /**/        /* allow -c switch */
  121. #define BACKUPNAME "BACKUP.LOG"    /* backup log file name */
  122. #define BUFFLIMIT 3000        /* how much empty space to save in buffer */
  123. #define FILEREAD "rb"        /* read a file in binary */
  124. #define FILEWRITE "wb"        /* write a binary file */
  125. #define FNAMESIZE 70        /* size of file names, allows paths */
  126. #define INT16 /**/        /* ints are 16 bits */
  127. #define LINELIMIT 75        /* number of spare lines to save */
  128. #define MAKE_BACKUP 1        /* 1 (true), want to make .bak file by default */
  129. #define MAXBUFF 60000        /* maximum number of total characters */
  130. #define MAXLINE 3500        /* maximum number of lines (abt. MAXBUFF/30) */
  131. #define REPEATBUFS 5        /* number of repeat buffers allowed */
  132. #define USELF /**/        /* using line feed */
  133. #define FILELF    /**/        /* also in files */
  134. #define NEWLINE 13        /* 1st line separator: CR */
  135. #define BUFFINDEX unsigned int
  136. /* #define USECTRLZ */
  137. #endif
  138. /* ---------------------------------------------------------------------- */
  139. /* ---------------------------------------------------------------------- */
  140. #ifdef GEMDOS
  141. #define HELP /**/        /* help available */
  142. #define FULLHELP /**/        /* all of it */
  143. #define CONFIGFILE /**/        /* allow -c switch */
  144. #define BACKUPNAME "BACKUP.LOG"    /* backup log file name */
  145. #define BUFFLIMIT 3000        /* how much empty space to save in buffer */
  146. #define FILEREAD "r"        /* read a file in binary */
  147. #define FILEWRITE "w"        /* write a binary file */
  148. #define fopen fopenb
  149. #define FNAMESIZE 70        /* size of file names, allows paths */
  150. #define INT16 /**/        /* ints are 16 bits */
  151. #define LINELIMIT 75        /* number of spare lines to save */
  152. #define MAKE_BACKUP 1        /* 1 (true), want to make .bak file by default */
  153. #define MAXBUFF 60000        /* maximum number of total characters */
  154. #define MAXLINE 3500        /* maximum number of lines (abt. MAXBUFF/30) */
  155. #define REPEATBUFS 5        /* number of repeat buffers allowed */
  156. #define USELF /**/        /* using line feed */
  157. #define FILELF /**/        /* also in files */
  158. #define NEWLINE 13        /* 1st line separator: CR */
  159. #define USECTRLZ /**/
  160. #define BUFFINDEX long
  161. #endif
  162. /* ---------------------------------------------------------------------- */
  163.  
  164. /* ---------------------------------------------------------------------- */
  165. #ifdef UNIX
  166. #define getchr fgetc
  167. #define FLOWCONTROL /**/    /* define this if you want ^S/^Q enabled */
  168. #undef COMMA_BAK        /* #define if you want ".," backup files */
  169. #define NO_EXTEND_CHAR        /* only allow 127 displayable chars */
  170.  
  171. #define HELP /**/        /* help available */
  172. #define FULLHELP /**/        /* all of it */
  173. #define CONFIGFILE /**/        /* allow -c switch */
  174. #define BACKUPNAME "BACKUP.LOG"    /* backup log file name */
  175. #define BUFFLIMIT 4000        /* how much empty space to save in buffer */
  176. #define FILEREAD "r"        /* read a file in binary */
  177. #define FILEWRITE "w"        /* write a binary file */
  178. #define FNAMESIZE 80        /* size of file names, allows paths */
  179. #define LINELIMIT 100        /* number of spare lines to save */
  180. #define MAKE_BACKUP 1        /* 1 (true), want to make .B file by default */
  181.         /* change to 0 if don't want, which is like other Unix eds */
  182. #define MAXBUFF 120000        /* maximum number of total characters */
  183. #define MAXLINE 5000        /* maximum number of lines (abt. MAXBUFF/30) */
  184. #define NEWLINE 10
  185. #define REPEATBUFS 9        /* number of repeat buffers allowed */
  186. #define USELF /**/        /* using line feed on screen */
  187. #define BUFFINDEX unsigned int
  188. #endif
  189. /* -------------------------------------------